﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using yncTech.BusinessObjects;
using System.Collections;

public partial class Admin_Sys_Sys003 : AdminBasePage
{
    protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
    {
        TSFunctionsCollection functions = new TSFunctionsCollection();
        ArrayList list = new ArrayList();
        list.Add(functions.Query.ParentID > 0);

        if (drpChannel.SelectedIndex > -1)
        {
            list.Add(functions.Query.ParentID == drpChannel.SelectedValue);
        }

        functions.Query.Where(list.ToArray());
        functions.Query.OrderBy(functions.Query.Sequence.Ascending);
        functions.Query.Load();

        pageGrid.DataSource = functions;
        pageGrid.DataBind();
    }

    protected void drpSystem_IndexChanged(object sender,EventArgs e)
    {
        drpChannel.SystemID = decimal.Parse(drpSystem.SelectedValue);
    }
}